package com.zzb.projectfactory.framework.autodoc.constant;

public enum ModuleType
{
    COMMON(1,"公用"),
    
    INDEX(2,"首页"),

    PERSONAL_INFO(3,"用户信息"),

    SETTING(4,"设置"),


    ;
    private final int index;
    private final String name;

    ModuleType(int index, String name) {
        this.index = index;
        this.name = name;
    }

    public int getIndex() {
        return index;
    }

    public String getName()
    {
        return name;
    }

    public static ModuleType getByName(String name){
        ModuleType[] values = ModuleType.values();
        for (ModuleType value : values) {
            if(value.getName().equals(name))return value;
        }
        return COMMON;
    }
}
